package com.zlsy.thread.singleton;

import java.util.Objects;

/**
 * @author zhouliang
 * @date 2020/5/8 20:39
 * <p>
 * 懒汉式 -线程不安全的 （不可用的）
 */
public class Singleton3 {

    private static Singleton3 instance;


    private Singleton3() {
    }

    public static Singleton3 getInstance() {
        if (Objects.isNull(instance)) {
            instance = new Singleton3();
        }
        return instance;
    }
}
